package main

import (
	"chat/SQL"
	"chat/router"
	"fmt"
	"os"
)

func main() {
	db, _ := SQL.ConnectSQL()
	StaticIsExists()
	router.CreateBaseRouter(db)
}
func StaticIsExists() {
	_, err := os.Stat("static")
	if err != nil {
		if !os.IsExist(err) {
			cErr := os.Mkdir("static", os.FileMode(0777))
			if cErr != nil {
				fmt.Println("create Dir Error:", cErr)
				return
			}
		}
		return
	}
}
